package oop.ex2.main;
import java.util.regex.*;

/**
 * an enum that defines the "type" of the line
 * @author danalmog
 *
 */
public enum chekcer {
	//Checks if the line is  
	VARIABLE(Main.VAR_REGEX+Main.VAR_END),
	METHOD("(int|double|String|boolean|char|void)\\s+(\\S+)\\s*\\(+(.*)\\)+\\s*\\{");
	private final Pattern patt;
	
	/**
	 * Construct a new enum with the desired pattern
	 * @param pattern the pattern in string form
	 */
	private chekcer(String pattern) {
		this.patt=Pattern.compile(pattern);
	}

	/**
	 * returns the pattern
	 * @return the pattern
	 */
	public Pattern getPatt() {
		return patt;
	}
}
	